Integrand size = 41, antiderivative size = 123 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx=-\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \log \left (1-\frac {(b f-a g) (c+d x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}+\frac {B n \operatorname {PolyLog}\left (2,\frac {(b f-a g) (c+d x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h} \]
-(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))*ln(1-(-a*g+b*f)*(d*x+c)/(-c*g+d*f)/(b*x +a))/(-a*g+b*f)/h+B*n*polylog(2,(-a*g+b*f)*(d*x+c)/(-c*g+d*f)/(b*x+a))/(-a *g+b*f)/h
Leaf count is larger than twice the leaf count of optimal. \(304\) vs. \(2(123)=246\).
Time = 0.26 (sec) , antiderivative size = 304, normalized size of antiderivative = 2.47 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx=-\frac {-2 A \log (a+b x)+B n \log ^2(a+b x)-2 B n \log (a+b x) \log (c+d x)+2 B n \log \left (\frac {d (a+b x)}{-b c+a d}\right ) \log (c+d x)-2 B \log (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )+2 A \log (f+g x)-2 B n \log (a+b x) \log (f+g x)+2 B n \log (c+d x) \log (f+g x)+2 B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log (f+g x)+2 B n \log (a+b x) \log \left (\frac {b (f+g x)}{b f-a g}\right )-2 B n \log (c+d x) \log \left (\frac {d (f+g x)}{d f-c g}\right )+2 B n \operatorname {PolyLog}\left (2,\frac {g (a+b x)}{-b f+a g}\right )+2 B n \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )-2 B n \operatorname {PolyLog}\left (2,\frac {g (c+d x)}{-d f+c g}\right )}{2 (b f-a g) h} \]
-1/2*(-2*A*Log[a + b*x] + B*n*Log[a + b*x]^2 - 2*B*n*Log[a + b*x]*Log[c + d*x] + 2*B*n*Log[(d*(a + b*x))/(-(b*c) + a*d)]*Log[c + d*x] - 2*B*Log[a + b*x]*Log[(e*(a + b*x)^n)/(c + d*x)^n] + 2*A*Log[f + g*x] - 2*B*n*Log[a + b *x]*Log[f + g*x] + 2*B*n*Log[c + d*x]*Log[f + g*x] + 2*B*Log[(e*(a + b*x)^ n)/(c + d*x)^n]*Log[f + g*x] + 2*B*n*Log[a + b*x]*Log[(b*(f + g*x))/(b*f - a*g)] - 2*B*n*Log[c + d*x]*Log[(d*(f + g*x))/(d*f - c*g)] + 2*B*n*PolyLog [2, (g*(a + b*x))/(-(b*f) + a*g)] + 2*B*n*PolyLog[2, (b*(c + d*x))/(b*c - a*d)] - 2*B*n*PolyLog[2, (g*(c + d*x))/(-(d*f) + c*g)])/((b*f - a*g)*h)
Time = 0.57 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.98, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {2973, 2967, 27, 2779, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{(f+g x) (a h+b h x)} \, dx\) |
\(\Big \downarrow \) 2973 |
\(\displaystyle \int \frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{(f+g x) (a h+b h x)}dx\) |
\(\Big \downarrow \) 2967 |
\(\displaystyle (b c-a d) \int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) h (a+b x) \left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a+b x) \left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{h}\) |
\(\Big \downarrow \) 2779 |
\(\displaystyle \frac {\frac {B n \int \frac {(c+d x) \log \left (1-\frac {(b f-a g) (c+d x)}{(d f-c g) (a+b x)}\right )}{a+b x}d\frac {a+b x}{c+d x}}{b f-a g}-\frac {\log \left (1-\frac {(c+d x) (b f-a g)}{(a+b x) (d f-c g)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b f-a g}}{h}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {\frac {B n \operatorname {PolyLog}\left (2,\frac {(b f-a g) (c+d x)}{(d f-c g) (a+b x)}\right )}{b f-a g}-\frac {\log \left (1-\frac {(c+d x) (b f-a g)}{(a+b x) (d f-c g)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b f-a g}}{h}\) |
(-(((A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[1 - ((b*f - a*g)*(c + d*x)) /((d*f - c*g)*(a + b*x))])/(b*f - a*g)) + (B*n*PolyLog[2, ((b*f - a*g)*(c + d*x))/((d*f - c*g)*(a + b*x))])/(b*f - a*g))/h
3.3.52.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r _.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) , x] + Simp[b*n*(p/(d*r)) Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol ] :> Simp[(b*c - a*d) Subst[Int[(b*f - a*g - (d*f - c*g)*x)^m*(b*h - a*i - (d*h - c*i)*x)^q*((A + B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, A, B, n}, x] && NeQ[b*c - a*d, 0] && IntegersQ[m, q] && IGtQ[p, 0]
Int[((A_.) + Log[(e_.)*(u_)^(n_.)*(v_)^(mn_)]*(B_.))^(p_.)*(w_.), x_Symbol] :> Subst[Int[w*(A + B*Log[e*(u/v)^n])^p, x], e*(u/v)^n, e*(u^n/v^n)] /; Fr eeQ[{e, A, B, n, p}, x] && EqQ[n + mn, 0] && LinearQ[{u, v}, x] && !Intege rQ[n]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 22.58 (sec) , antiderivative size = 1447, normalized size of antiderivative = 11.76
1/2*I/h/(a*g-b*f)*ln(b*x+a)*B*Pi*csgn(I*(b*x+a)^n)*csgn(I/((d*x+c)^n))*csg n(I*(b*x+a)^n/((d*x+c)^n))-1/2*I/h/(a*g-b*f)*ln(g*x+f)*B*Pi*csgn(I*e)*csgn (I*(b*x+a)^n/((d*x+c)^n))*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)-1/2*I/h/(a*g-b*f )*ln(g*x+f)*B*Pi*csgn(I*(b*x+a)^n)*csgn(I/((d*x+c)^n))*csgn(I*(b*x+a)^n/(( d*x+c)^n))+1/2*I/h/(a*g-b*f)*ln(b*x+a)*B*Pi*csgn(I*e)*csgn(I*(b*x+a)^n/((d *x+c)^n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+f)*ln((b*(g*x+f)+a*g-b*f)/(a*g-b*f))+1/h...
\[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx=\int { \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{{\left (b h x + a h\right )} {\left (g x + f\right )}} \,d x } \]
Timed out. \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx=\text {Timed out} \]
\[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx=\int { \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{{\left (b h x + a h\right )} {\left (g x + f\right )}} \,d x } \]
A*(log(b*x + a)/((b*f - a*g)*h) - log(g*x + f)/((b*f - a*g)*h)) - B*integr ate(-(log((b*x + a)^n) - log((d*x + c)^n) + log(e))/(b*g*h*x^2 + a*f*h + ( b*f*h + a*g*h)*x), x)
\[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx=\int { \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{{\left (b h x + a h\right )} {\left (g x + f\right )}} \,d x } \]
Timed out. \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx=\int \frac {A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{\left (f+g\,x\right )\,\left (a\,h+b\,h\,x\right )} \,d x \]